﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Wfxin.SystemFramework.SystemLog
{
    public class SystemLoggingOptions
    {
        public string ConnString { get; set; }

        internal IList<ISystemLogging> Extensions { get; }

        public SystemLoggingOptions()
        {
            this.Extensions = new List<ISystemLogging>();
        }

        /// <summary>
        /// Registers an extension that will be executed when building services.
        /// </summary>
        /// <param name="extension"></param>
        public void Register(ISystemLogging extension)
        {
            if (extension == null)
            {
                throw new ArgumentNullException(nameof(extension));
            }

            Extensions.Add(extension);
        }

    }
}
